package beans;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;
import java.io.Serializable;
import java.util.Collection;

public class Etudiant implements Serializable {

	private static final long serialVersionUID = 7339485522350639569L;

	private int numEtudiant;
	private Collection<Note> listeNotes;
	private Collection<Promotion> listePromotions;
	private Collection<Examen> listeExamens;

	PropertyChangeSupport changeSupport;
	VetoableChangeSupport vetoableSupport;
	
	public Etudiant() {}
	
	public Etudiant(int numEtudiant) {
		super();
		this.numEtudiant = numEtudiant;
		this.listeExamens = null;
		this.listeNotes = null;
		this.listePromotions = null;
	}

	public Collection<Examen> getListeExamens() {
		return listeExamens;
	}

	public void setListeExamens(Collection<Examen> listeExamens) {
		this.listeExamens = listeExamens;
	}

	public Collection<Note> getListeNotes() {
		return listeNotes;
	}

	public void setListeNotes(Collection<Note> listeNotes) {
		this.listeNotes = listeNotes;
	}

	public Collection<Promotion> getListePromotions() {
		return listePromotions;
	}

	public void setListePromotions(Collection<Promotion> listePromotions) {
		this.listePromotions = listePromotions;
	}
	
	public int getNumEtudiant() {
		return numEtudiant;
	}

	public void setNumEtudiant(int numEtudiant) {
		this.numEtudiant = numEtudiant;
	}
	
	public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.addPropertyChangeListener(listener);
	}
	
	public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.removePropertyChangeListener(listener);
	}
	
	public synchronized void addVetoableChangeListener(VetoableChangeListener listener) {
		vetoableSupport.addVetoableChangeListener(listener);
	}
	
	public synchronized void removeVetoableChangeListener(VetoableChangeListener listener) {
		vetoableSupport.removeVetoableChangeListener(listener);
	} 
}
